/*
 Navicat Premium Data Transfer

 Source Server         : 本机
 Source Server Type    : MySQL
 Source Server Version : 80012
 Source Host           : localhost
 Source Database       : ladon_db

 Target Server Type    : MySQL
 Target Server Version : 80012
 File Encoding         : utf-8

 Date: 01/01/2020 15:13:05 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `c_common_info`
-- ----------------------------
DROP TABLE IF EXISTS `c_common_info`;
CREATE TABLE `c_common_info` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `classify` varchar(32) NOT NULL COMMENT '基础信息分类表',
  `parent_classify` varchar(32) DEFAULT NULL,
  `code` varchar(64) NOT NULL COMMENT '编码信息',
  `name` varchar(64) NOT NULL COMMENT '数据源名称',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='基础信息表';

-- ----------------------------
--  Records of `c_common_info`
-- ----------------------------
BEGIN;
INSERT INTO `c_common_info` VALUES ('1', 'department', null, '1', '数据技术部', '0', '1', '1', '1', '1'), ('1778191089896472576', 'department', null, '2', '运营部', '0', '1', null, '1577805144', null);
COMMIT;

-- ----------------------------
--  Table structure for `c_datasource`
-- ----------------------------
DROP TABLE IF EXISTS `c_datasource`;
CREATE TABLE `c_datasource` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `name` varchar(64) NOT NULL COMMENT '数据源名称',
  `type` varchar(64) NOT NULL COMMENT '数据源类型, MySQL, Oracle',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态, 0 - 可用; 1 - 不可用',
  `jdbc_driver` varchar(512) NOT NULL COMMENT 'jdbc驱动',
  `jdbc_url` varchar(2048) NOT NULL COMMENT 'jdbc URL',
  `username` varchar(64) NOT NULL COMMENT '登录用户名',
  `password` varchar(64) DEFAULT NULL COMMENT '登录密码',
  `timeout` int(11) NOT NULL COMMENT '连接池超时时间(ms)',
  `test_sql` varchar(1024) DEFAULT NULL COMMENT '检测SQL',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  `use_type` tinyint(1) DEFAULT '1' COMMENT '用途, 1 - 数据查询; 2- 数据录入',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据源信息表';

-- ----------------------------
--  Records of `c_datasource`
-- ----------------------------
BEGIN;
INSERT INTO `c_datasource` VALUES ('1758164842805493760', '本地测试数据库', 'MySQL', '0', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql://127.0.0.1:3306/ladon_db?tinyInt1isBit=false&useSSL=false', 'root', '12345678', '1', null, '0', '1', '1', '1576639463', '1577805951', '1');
COMMIT;

-- ----------------------------
--  Table structure for `demo_car_sales`
-- ----------------------------
DROP TABLE IF EXISTS `demo_car_sales`;
CREATE TABLE `demo_car_sales` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `car_brand` varchar(64) DEFAULT NULL COMMENT '汽车品牌名称',
  `month` int(2) DEFAULT NULL COMMENT '月份',
  `sales` bigint(11) DEFAULT NULL COMMENT '销量',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='汽车销售情况表，用于示例';

-- ----------------------------
--  Records of `demo_car_sales`
-- ----------------------------
BEGIN;
INSERT INTO `demo_car_sales` VALUES ('1', '奔驰', '10', '78'), ('2', '奔驰', '11', '100'), ('3', '奔驰', '12', '134'), ('4', '宝马', '10', '65'), ('5', '宝马', '11', '69'), ('6', '宝马', '12', '87'), ('7', '奥迪', '10', '163'), ('8', '奥迪', '12', '90'), ('9', '奥迪', '11', '82');
COMMIT;

-- ----------------------------
--  Table structure for `pd_import_record`
-- ----------------------------
DROP TABLE IF EXISTS `pd_import_record`;
CREATE TABLE `pd_import_record` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `datasource_id` bigint(20) NOT NULL COMMENT '数据源Id',
  `datasource_type` varchar(50) NOT NULL COMMENT '数据源类型',
  `table_name` varchar(512) NOT NULL COMMENT '具体表名',
  `file_name` varchar(200) NOT NULL COMMENT '模型名称',
  `overwrited` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否覆盖 0 - 不覆盖,追加; 1 - 覆盖',
  `partition_name` varchar(200) DEFAULT NULL COMMENT '分区名称',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  `status` tinyint(1) DEFAULT NULL COMMENT '导入状态,0:导入中,1导入成功,2导入失败',
  `error_info` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据导入记录表';

-- ----------------------------
--  Table structure for `pd_model`
-- ----------------------------
DROP TABLE IF EXISTS `pd_model`;
CREATE TABLE `pd_model` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `datasource_id` bigint(20) NOT NULL COMMENT '数据源Id',
  `table_name` varchar(512) NOT NULL COMMENT '具体表名',
  `name` varchar(64) NOT NULL COMMENT '模型名称',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '模型状态 0 - 使用中; 1 - 已停用',
  `desc` varchar(512) DEFAULT NULL COMMENT '描述',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='模型信息表';

-- ----------------------------
--  Records of `pd_model`
-- ----------------------------
BEGIN;
INSERT INTO `pd_model` VALUES ('1778228559191162880', '1758164842805493760', 'demo_car_sales', '汽车销量', '0', '汽车销售情况', '0', '1', null, '1577807325', null);
COMMIT;

-- ----------------------------
--  Table structure for `pd_model_meta`
-- ----------------------------
DROP TABLE IF EXISTS `pd_model_meta`;
CREATE TABLE `pd_model_meta` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `model_id` bigint(20) NOT NULL COMMENT '模型Id',
  `group_name` varchar(512) NOT NULL COMMENT '元素分组名',
  `name` varchar(64) NOT NULL COMMENT '元素名称(表字段名称)',
  `data_type` varchar(64) NOT NULL COMMENT '数据类型',
  `original_data_type` varchar(64) NOT NULL,
  `remark` varchar(255) DEFAULT NULL COMMENT '字段详细描述',
  `display` tinyint(1) DEFAULT '1' COMMENT '是否显示, 1-显示; 0 - 不显示',
  `show_name` varchar(64) NOT NULL COMMENT '显示名称',
  `tag_id` bigint(20) DEFAULT NULL COMMENT '标签id',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='模型元素信息表';

-- ----------------------------
--  Records of `pd_model_meta`
-- ----------------------------
BEGIN;
INSERT INTO `pd_model_meta` VALUES ('1778228559191162881', '1778228559191162880', '', 'id', 'LONG', 'bigint', null, '1', 'id', '1', '0', '1', null, '1577807325', null), ('1778228559191162882', '1778228559191162880', '', 'car_brand', 'STRING', 'varchar', null, '1', '汽车品牌', '1', '0', '1', null, '1577807325', null), ('1778228559191162883', '1778228559191162880', '', 'month', 'INTEGER', 'int', null, '1', '月份', '1', '0', '1', null, '1577807325', null), ('1778228559191162884', '1778228559191162880', '', 'sales', 'LONG', 'bigint', null, '1', '销量', '1', '0', '1', null, '1577807325', null);
COMMIT;

-- ----------------------------
--  Table structure for `pd_model_schema`
-- ----------------------------
DROP TABLE IF EXISTS `pd_model_schema`;
CREATE TABLE `pd_model_schema` (
  `id` bigint(32) NOT NULL AUTO_INCREMENT COMMENT '主键标识',
  `datasource_id` bigint(20) DEFAULT NULL COMMENT '数据源id',
  `table_name` varchar(100) DEFAULT NULL COMMENT '物理表名称',
  `field_name` varchar(255) DEFAULT NULL COMMENT '字段名称',
  `data_type` varchar(50) DEFAULT NULL COMMENT '字段类型',
  `comments` varchar(255) DEFAULT NULL COMMENT '字段备注',
  `remark` varchar(255) DEFAULT NULL COMMENT '字段详细描述',
  `archive` tinyint(1) DEFAULT NULL COMMENT '删除标志',
  `created_by` bigint(20) DEFAULT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='模型元数据表';

-- ----------------------------
--  Records of `pd_model_schema`
-- ----------------------------
BEGIN;
INSERT INTO `pd_model_schema` VALUES ('1', '1758437435789852672', 'sys_user', 'user_type', 'STRING', '1', '1', '0', '1', '1', '1', '1');
COMMIT;

-- ----------------------------
--  Table structure for `pd_peek`
-- ----------------------------
DROP TABLE IF EXISTS `pd_peek`;
CREATE TABLE `pd_peek` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `model_id` bigint(20) NOT NULL COMMENT '模型Id',
  `name` varchar(64) NOT NULL COMMENT '取数实例名称',
  `fields` text COMMENT '返回的数据字段名列表, 多个以","隔开',
  `peek_time` int(11) NOT NULL DEFAULT '0' COMMENT '取数次数',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='取数实例信息表';

-- ----------------------------
--  Records of `pd_peek`
-- ----------------------------
BEGIN;
INSERT INTO `pd_peek` VALUES ('1778231668747485184', '1778228559191162880', '宝马每个月的销售情况', null, '0', '0', '1', null, '1577807506', null), ('1778233902130479104', '1778228559191162880', '各品牌销量汇总', null, '0', '0', '1', null, '1577807636', null);
COMMIT;

-- ----------------------------
--  Table structure for `pd_peek_field`
-- ----------------------------
DROP TABLE IF EXISTS `pd_peek_field`;
CREATE TABLE `pd_peek_field` (
  `id` bigint(20) NOT NULL COMMENT '逻辑主键',
  `peek_id` bigint(20) DEFAULT NULL COMMENT '取数id',
  `meta_id` bigint(20) DEFAULT NULL COMMENT '字段id',
  `type` varchar(10) DEFAULT NULL COMMENT '类型,维度还是指标',
  `agg_expression` varchar(50) DEFAULT NULL COMMENT '聚合函数',
  `data_type` varchar(50) DEFAULT NULL COMMENT '数据类型',
  `format` varchar(50) DEFAULT NULL COMMENT '格式',
  `alias` varchar(256) DEFAULT NULL,
  `agg_data_type` varchar(32) DEFAULT NULL,
  `archive` tinyint(1) DEFAULT NULL COMMENT '删除标志',
  `created_by` bigint(20) DEFAULT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='取数字段表';

-- ----------------------------
--  Records of `pd_peek_field`
-- ----------------------------
BEGIN;
INSERT INTO `pd_peek_field` VALUES ('1778231668747485186', '1778231668747485184', '1778228559191162882', 'dimension', null, null, null, null, 'STRING', '0', '1', null, '1577807506', null), ('1778231668747485187', '1778231668747485184', '1778228559191162883', 'dimension', null, null, null, null, 'INTEGER', '0', '1', null, '1577807506', null), ('1778231668747485188', '1778231668747485184', '1778228559191162884', 'dimension', null, null, null, null, 'LONG', '0', '1', null, '1577807507', null), ('1778233902130479105', '1778233902130479104', '1778228559191162882', 'dimension', null, null, null, null, 'STRING', '0', '1', null, '1577807636', null), ('1778233902130479106', '1778233902130479104', '1778228559191162884', 'measure', 'SUM', null, null, '总销量', 'LONG', '0', '1', null, '1577807636', null);
COMMIT;

-- ----------------------------
--  Table structure for `pd_peek_rule`
-- ----------------------------
DROP TABLE IF EXISTS `pd_peek_rule`;
CREATE TABLE `pd_peek_rule` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `peek_id` bigint(20) NOT NULL COMMENT '取数实例Id',
  `meta_id` bigint(20) NOT NULL COMMENT '元素Id',
  `field_name` varchar(128) DEFAULT NULL COMMENT '字段名称',
  `rule` varchar(64) NOT NULL COMMENT '规则名称',
  `value` varchar(2048) NOT NULL COMMENT '代入值',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='取数规则信息表';

-- ----------------------------
--  Records of `pd_peek_rule`
-- ----------------------------
BEGIN;
INSERT INTO `pd_peek_rule` VALUES ('1778231668747485185', '1778231668747485184', '1778228559191162882', null, 'equals', '宝马', '0', '1', null, '1577807506', null);
COMMIT;

-- ----------------------------
--  Table structure for `pd_tag`
-- ----------------------------
DROP TABLE IF EXISTS `pd_tag`;
CREATE TABLE `pd_tag` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `name` varchar(64) NOT NULL COMMENT '标签名',
  `rule` varchar(64) NOT NULL COMMENT '匹配规则',
  `defaulted` tinyint(1) DEFAULT '0' COMMENT '是否默认标签,0为非默认,1为默认，默认标签不可删除',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='模型标签表';

-- ----------------------------
--  Records of `pd_tag`
-- ----------------------------
BEGIN;
INSERT INTO `pd_tag` VALUES ('1', '默认标签', ' ', '1', '0', '1', null, '122342324', null);
COMMIT;

-- ----------------------------
--  Table structure for `r_group`
-- ----------------------------
DROP TABLE IF EXISTS `r_group`;
CREATE TABLE `r_group` (
  `id` bigint(20) NOT NULL,
  `parent_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '父级节点Id, 默认为0',
  `name` varchar(128) NOT NULL COMMENT '报表组名',
  `icon` varchar(256) DEFAULT NULL COMMENT '报表组图标',
  `level` tinyint(1) NOT NULL DEFAULT '1' COMMENT '所在层级',
  `sort_id` bigint(20) NOT NULL COMMENT '排序Id',
  `comment` varchar(512) DEFAULT NULL COMMENT '描述信息',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报表分组表';

-- ----------------------------
--  Records of `r_group`
-- ----------------------------
BEGIN;
INSERT INTO `r_group` VALUES ('1758167608764432385', '0', '销售报表', 'dot-chart', '1', '1758167608764432384', null, '0', '1', null, '1576639624', null);
COMMIT;

-- ----------------------------
--  Table structure for `r_query_field`
-- ----------------------------
DROP TABLE IF EXISTS `r_query_field`;
CREATE TABLE `r_query_field` (
  `id` bigint(20) NOT NULL,
  `report_id` bigint(20) NOT NULL COMMENT '报表Id',
  `show_name` varchar(32) NOT NULL COMMENT '字段显示名',
  `query_name` varchar(32) NOT NULL COMMENT '查询sql代入名',
  `data_type` varchar(32) NOT NULL COMMENT '字段数据类型',
  `val_default` varchar(64) DEFAULT NULL COMMENT '默认值',
  `val_max` varchar(64) DEFAULT NULL COMMENT '最大值',
  `val_min` varchar(64) DEFAULT NULL COMMENT '最小值',
  `val_forbidden` varchar(256) DEFAULT NULL COMMENT '禁止使用值',
  `must_fill_in` tinyint(1) DEFAULT '0' COMMENT '是否为必填字段 0 - 否; 1 - 必填',
  `order_by_type` varchar(16) DEFAULT NULL COMMENT '排序方式 ASC, DESC',
  `placeholder` varchar(64) DEFAULT NULL COMMENT '提示信息',
  `err_message` varchar(128) DEFAULT NULL COMMENT '错误提示信息',
  `depend_on` varchar(512) DEFAULT NULL COMMENT '依赖关系, 取query_name值,多个以逗号分隔',
  `type` int(11) NOT NULL DEFAULT '0' COMMENT '字段类型; 0 - 普通字段; 1 - 内部字段; 2 - 多选字段; 4 - lov选择; ',
  `lov_report_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '当字段值内容依赖别一个sql查询结果时(LOV), 填入',
  `sort_id` bigint(20) NOT NULL COMMENT '排序Id',
  `comment` varchar(512) DEFAULT NULL COMMENT '描述信息',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报表查询字段信息表';

-- ----------------------------
--  Records of `r_query_field`
-- ----------------------------
BEGIN;
INSERT INTO `r_query_field` VALUES ('1778247972443340801', '1778237217845231617', '品牌名称', 'car_brand', 'STRING', null, null, null, null, '0', null, null, null, null, '0', '0', '1778247972443340800', null, '0', '1', null, '1577808455', null), ('1778247972443340803', '1778237217845231617', '月份', 'month', 'INTEGER', null, null, null, null, '0', null, null, null, null, '0', '0', '1778247972443340802', null, '0', '1', null, '1577808455', null);
COMMIT;

-- ----------------------------
--  Table structure for `r_report`
-- ----------------------------
DROP TABLE IF EXISTS `r_report`;
CREATE TABLE `r_report` (
  `id` bigint(20) NOT NULL,
  `code` varchar(32) NOT NULL COMMENT '报表编码全局唯一',
  `name` varchar(32) NOT NULL COMMENT '报表名称',
  `type` varchar(128) NOT NULL COMMENT '报表类型, 1 - 表格; 2 - 图表; 3 - xxx等; 多个以逗号分隔',
  `x_axis` varchar(64) DEFAULT NULL COMMENT '图表显示时, x轴列名; 多个以";"隔开',
  `y_axis` varchar(64) DEFAULT NULL COMMENT '图表显示时,y轴列名; 多个以";"隔开',
  `icon` varchar(256) DEFAULT NULL COMMENT '报表图标',
  `detail_sql_id` bigint(20) DEFAULT NULL COMMENT '报表详情查询Id',
  `count_sql_id` bigint(20) DEFAULT NULL COMMENT '报表合计查询Id',
  `query_field_label_len` smallint(6) DEFAULT NULL COMMENT '查询字段标签显示长度',
  `query_field_media_len` smallint(6) DEFAULT NULL COMMENT '查询字段控件显示长度',
  `simple_report` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 - 普通报表; 1 - LOV报表',
  `statical` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否为静态报表; 0 - 否; 1 - 是;',
  `sort_id` bigint(20) NOT NULL COMMENT '排序Id',
  `comment` varchar(512) DEFAULT NULL COMMENT '描述信息',
  `flow_switch` int(11) DEFAULT NULL,
  `owner` bigint(20) DEFAULT NULL,
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报表信息表';

-- ----------------------------
--  Records of `r_report`
-- ----------------------------
BEGIN;
INSERT INTO `r_report` VALUES ('1778237217845231617', 'hAv0lt4R5X', '汽车销售榜单', '1', null, null, null, '1778245876499300352', null, null, null, '0', '0', '1778237217845231616', null, '0', '1', '0', '1', '1', '1577807829', '1577808333');
COMMIT;

-- ----------------------------
--  Table structure for `r_report_column`
-- ----------------------------
DROP TABLE IF EXISTS `r_report_column`;
CREATE TABLE `r_report_column` (
  `id` bigint(20) NOT NULL,
  `report_Id` bigint(20) NOT NULL COMMENT '报表Id',
  `raw` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为原生的列; 0 - 原生的; 1 - 加工过(分裂新生成的)',
  `name` varchar(32) NOT NULL COMMENT '列名',
  `show_name` varchar(32) NOT NULL COMMENT '显示名',
  `data_type` varchar(32) NOT NULL COMMENT '数据类型',
  `unit` varchar(32) DEFAULT NULL COMMENT '数据单位',
  `hidden` tinyint(1) DEFAULT '0' COMMENT '是否为隐藏列; 0 - 正常显示; 1 - 隐藏列',
  `drill` tinyint(1) DEFAULT '0' COMMENT '是否为下钻列; 0 - 否; 1 - 下钻列',
  `support_sort` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否支持排序; 0 - 否; 1 - 是',
  `drill_report_id` bigint(20) DEFAULT NULL COMMENT '下钻查询详细报表Id',
  `drill_params` varchar(256) DEFAULT NULL COMMENT '下钻列时,需要的参数; kv1= column_name1; kv2 = column_name2;',
  `frozen` tinyint(1) DEFAULT '0' COMMENT '是否为冻结列; 0 - 否; 1 - 冻结列',
  `split` tinyint(1) DEFAULT '0' COMMENT '是否需要分裂; 0 - 否; 1 - 需要',
  `split_char` varchar(16) DEFAULT NULL COMMENT '分裂分隔字符串',
  `split_kv_char` varchar(16) DEFAULT NULL COMMENT '分裂后kv的分隔字符串',
  `format_macro` varchar(128) DEFAULT NULL COMMENT '数据格式化宏',
  `sort_id` bigint(20) NOT NULL COMMENT '排序Id',
  `comment` varchar(512) DEFAULT NULL COMMENT '描述信息',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报表字段信息表';

-- ----------------------------
--  Records of `r_report_column`
-- ----------------------------
BEGIN;
INSERT INTO `r_report_column` VALUES ('1778248814256930817', '1778237217845231617', '1', 'sales', '销量', 'INTEGER', '百万辆', '0', '0', '0', null, null, '0', '0', null, null, null, '1778248814256930816', null, '0', '1', null, '1577808504', null);
COMMIT;

-- ----------------------------
--  Table structure for `r_report_rl_group`
-- ----------------------------
DROP TABLE IF EXISTS `r_report_rl_group`;
CREATE TABLE `r_report_rl_group` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `group_id` bigint(20) NOT NULL COMMENT '分组Id',
  `report_id` bigint(20) NOT NULL COMMENT '报表Id',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报表与分组关系表';

-- ----------------------------
--  Records of `r_report_rl_group`
-- ----------------------------
BEGIN;
INSERT INTO `r_report_rl_group` VALUES ('1778237217845231618', '1758167608764432385', '1778237217845231617', '0', '1', null, '1577807829', null);
COMMIT;

-- ----------------------------
--  Table structure for `r_report_rl_role`
-- ----------------------------
DROP TABLE IF EXISTS `r_report_rl_role`;
CREATE TABLE `r_report_rl_role` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `role_id` bigint(20) NOT NULL COMMENT '分组Id',
  `report_code` varchar(32) NOT NULL COMMENT '报表Id',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报表与角色关系表';

-- ----------------------------
--  Records of `r_report_rl_role`
-- ----------------------------
BEGIN;
INSERT INTO `r_report_rl_role` VALUES ('1', '1', '1', '0', '1', '1', '1', '1');
COMMIT;

-- ----------------------------
--  Table structure for `r_report_sql`
-- ----------------------------
DROP TABLE IF EXISTS `r_report_sql`;
CREATE TABLE `r_report_sql` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `ds_id` bigint(20) NOT NULL COMMENT '依赖的数据源Id',
  `cached` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否需要缓存; 0 - 不需要; 1 - 需要',
  `cached_time` int(11) DEFAULT NULL COMMENT '缓存时间(秒)',
  `timeout` int(11) DEFAULT NULL COMMENT '超时时间(秒)',
  `text` text NOT NULL COMMENT 'sql内容',
  `need_detail_log` tinyint(1) DEFAULT '0' COMMENT '是否需要详细运行日志, 0 - 不需要(只记录运行耗时、运行错误信息), 1 - 记录运行sql及所有默认信息',
  `comment` varchar(256) DEFAULT NULL,
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报表执行sql表';

-- ----------------------------
--  Records of `r_report_sql`
-- ----------------------------
BEGIN;
INSERT INTO `r_report_sql` VALUES ('1758341812637974528', '1758164842805493760', '0', '5', '10', 'select * from r_report', '1', null, '1', '1', null, '1576649764', null), ('1770216486678814725', '1758164842805493760', '0', '5', '10', 'select * from r_report', '1', null, '1', '1', null, '1577340961', null), ('1778245876499300352', '1758164842805493760', '0', '5', '10', 'SELECT car_brand,month,sales FROM demo_car_sales\nWHERE 1=1 \n<IF> \n<EXP1>#month#</EXP1> <OP>is not null</OP> <EXP2></EXP2>\n<TEXT>\nAND month =#month#\n</TEXT>\n</IF>\n\n<IF> \n<EXP1>#car_brand#</EXP1> <OP>is not blank</OP> <EXP2></EXP2>\n<TEXT>\nAND car_brand =#car_brand#\n</TEXT>\n</IF>', '1', null, '0', '1', '1', '1577808333', '1577808933');
COMMIT;

-- ----------------------------
--  Table structure for `r_sql_run_log`
-- ----------------------------
DROP TABLE IF EXISTS `r_sql_run_log`;
CREATE TABLE `r_sql_run_log` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `ds_id` bigint(20) NOT NULL COMMENT '依赖的数据源Id',
  `report_id` bigint(20) NOT NULL COMMENT '所在报表Id',
  `sql_id` bigint(20) NOT NULL COMMENT '原sqlId',
  `elapsed_time` int(11) NOT NULL COMMENT '运行耗时',
  `complete` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'sql运行状态; 0 - 运行出错; 1 - 成功',
  `text` text COMMENT 'sql内容',
  `err_info` text COMMENT '错误信息',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  `cached` tinyint(1) NOT NULL DEFAULT '0' COMMENT '查询命中缓存; 0 - 否; 1 - 是',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='sql执行日志表';

-- ----------------------------
--  Records of `r_sql_run_log`
-- ----------------------------
BEGIN;
INSERT INTO `r_sql_run_log` VALUES ('1758343032408686592', '1758164842805493760', '1', '1758341812637974528', '15', '1', ' select * from r_report', null, '0', '1', null, '1576649835', null, '0'), ('1769140133514649600', '1758164842805493760', '1', '1758341812637974528', '38', '1', ' select * from r_report', null, '0', '1', null, '1577278309', null, '0'), ('1769230568346075136', '1758164842805493760', '1', '1758341812637974528', '19', '1', ' select * from r_report', null, '0', '1769227836746874880', null, '1577283573', null, '0'), ('1769232784549208064', '1758164842805493760', '1', '1758341812637974528', '20', '1', ' select * from r_report', null, '0', '1769227836746874880', null, '1577283702', null, '0'), ('1778253865138470912', '1758164842805493760', '1778237217845231617', '1778245876499300352', '4', '0', 'SELECT car_brand,month,sales FROM demo_car_sales\nWHERE   ', 'BadSqlGrammarException : PreparedStatementCallback; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'\' at line 2 \r\n org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234)\norg.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\norg.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1442)\norg.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:632)\ncom.mallcai.bigdata.ladon.datasource.AbstractJdbcHandler.queryDataWithRunInfo(AbstractJdbcHandler.java:84)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.ReportQueryDbHandler.preInternal(ReportQueryDbHandler.java:35)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:14)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryPipeline.doQuery(ReportQueryPipeline.java:45)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportDataQueryService.queryData(ReportDataQueryService.java:64)\ncom.mallcai.bigdata.ladon.controller.report.ReportController.queryData(ReportController.java:180)\nsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\njava.lang.reflect.Method.invoke(Method.java:498)\norg.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189)\norg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)\norg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\norg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)\norg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)\norg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\norg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\norg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\norg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)\norg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)\njavax.servlet.http.HttpServlet.service(HttpServlet.java:706)\norg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)\njavax.servlet.http.HttpServlet.service(HttpServlet.java:791)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114)\norg.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)\norg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\norg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\norg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\norg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\norg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\norg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\norg.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\norg.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\norg.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)\norg.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)\norg.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\njava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\njava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\norg.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\njava.lang.Thread.run(Thread.java:748)\n', '0', '1', null, '1577808798', null, '0'), ('1778253882318340096', '1758164842805493760', '1778237217845231617', '1778245876499300352', '3', '0', 'SELECT car_brand,month,sales FROM demo_car_sales\nWHERE   ', 'BadSqlGrammarException : PreparedStatementCallback; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'\' at line 2 \r\n org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234)\norg.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\norg.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1442)\norg.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:632)\ncom.mallcai.bigdata.ladon.datasource.AbstractJdbcHandler.queryDataWithRunInfo(AbstractJdbcHandler.java:84)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.ReportQueryDbHandler.preInternal(ReportQueryDbHandler.java:35)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:14)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryPipeline.doQuery(ReportQueryPipeline.java:45)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportDataQueryService.queryData(ReportDataQueryService.java:64)\ncom.mallcai.bigdata.ladon.controller.report.ReportController.queryData(ReportController.java:180)\nsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\njava.lang.reflect.Method.invoke(Method.java:498)\norg.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189)\norg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)\norg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\norg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)\norg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)\norg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\norg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\norg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\norg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)\norg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)\njavax.servlet.http.HttpServlet.service(HttpServlet.java:706)\norg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)\njavax.servlet.http.HttpServlet.service(HttpServlet.java:791)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114)\norg.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)\norg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\norg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\norg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\norg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\norg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\norg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\norg.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\norg.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\norg.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)\norg.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)\norg.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\njava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\njava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\norg.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\njava.lang.Thread.run(Thread.java:748)\n', '0', '1', null, '1577808799', null, '0'), ('1778255462866305024', '1758164842805493760', '1778237217845231617', '1778245876499300352', '1', '0', 'SELECT car_brand,month,sales FROM demo_car_sales\nWHERE 1=1 AND   ', 'BadSqlGrammarException : PreparedStatementCallback; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'\' at line 2 \r\n org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234)\norg.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\norg.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1442)\norg.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:632)\ncom.mallcai.bigdata.ladon.datasource.AbstractJdbcHandler.queryDataWithRunInfo(AbstractJdbcHandler.java:84)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.ReportQueryDbHandler.preInternal(ReportQueryDbHandler.java:35)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:14)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryPipeline.doQuery(ReportQueryPipeline.java:45)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportDataQueryService.queryData(ReportDataQueryService.java:64)\ncom.mallcai.bigdata.ladon.controller.report.ReportController.queryData(ReportController.java:180)\nsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\njava.lang.reflect.Method.invoke(Method.java:498)\norg.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189)\norg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)\norg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\norg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)\norg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)\norg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\norg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\norg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\norg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)\norg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)\njavax.servlet.http.HttpServlet.service(HttpServlet.java:706)\norg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)\njavax.servlet.http.HttpServlet.service(HttpServlet.java:791)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114)\norg.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)\norg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\norg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\norg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\norg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\norg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\norg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\norg.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\norg.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\norg.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)\norg.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)\norg.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\njava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\njava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\norg.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\njava.lang.Thread.run(Thread.java:748)\n', '0', '1', null, '1577808891', null, '0'), ('1778255617485127680', '1758164842805493760', '1778237217845231617', '1778245876499300352', '1', '0', 'SELECT car_brand,month,sales FROM demo_car_sales\nWHERE 1=1 AND   ', 'BadSqlGrammarException : PreparedStatementCallback; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'\' at line 2 \r\n org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234)\norg.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\norg.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1442)\norg.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:632)\ncom.mallcai.bigdata.ladon.datasource.AbstractJdbcHandler.queryDataWithRunInfo(AbstractJdbcHandler.java:84)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.ReportQueryDbHandler.preInternal(ReportQueryDbHandler.java:35)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:14)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryBothHandler.preHandle(AbstractReportQueryBothHandler.java:21)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.handler.AbstractReportQueryPreHandler.preHandle(AbstractReportQueryPreHandler.java:15)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryContext.next(ReportQueryContext.java:119)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportQueryPipeline.doQuery(ReportQueryPipeline.java:45)\ncom.mallcai.bigdata.ladon.service.report.impl.ReportDataQueryService.queryData(ReportDataQueryService.java:64)\ncom.mallcai.bigdata.ladon.controller.report.ReportController.queryData(ReportController.java:180)\nsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\njava.lang.reflect.Method.invoke(Method.java:498)\norg.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189)\norg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)\norg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\norg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)\norg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)\norg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\norg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\norg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\norg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)\norg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)\njavax.servlet.http.HttpServlet.service(HttpServlet.java:706)\norg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)\njavax.servlet.http.HttpServlet.service(HttpServlet.java:791)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114)\norg.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\norg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\norg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\norg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\norg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)\norg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\norg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\norg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\norg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\norg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\norg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\norg.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\norg.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\norg.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)\norg.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)\norg.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\njava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\njava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\norg.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\njava.lang.Thread.run(Thread.java:748)\n', '0', '1', null, '1577808900', null, '0'), ('1778256270320156672', '1758164842805493760', '1778237217845231617', '1778245876499300352', '3', '1', ' SELECT car_brand,month,sales FROM demo_car_sales\nWHERE 1=1   ', null, '0', '1', null, '1577808938', null, '0'), ('1778256356219502592', '1758164842805493760', '1778237217845231617', '1778245876499300352', '3', '1', ' SELECT car_brand,month,sales FROM demo_car_sales\nWHERE 1=1   ', null, '0', '1', null, '1577808943', null, '0'), ('1778256528018194432', '1758164842805493760', '1778237217845231617', '1778245876499300352', '1', '1', ' SELECT car_brand,month,sales FROM demo_car_sales\nWHERE 1=1   AND car_brand =\'奔驰\'', null, '0', '1', null, '1577808953', null, '0'), ('1778256837255839744', '1758164842805493760', '1778237217845231617', '1778245876499300352', '2', '1', ' SELECT car_brand,month,sales FROM demo_car_sales\nWHERE 1=1 AND month =10  AND car_brand =\'奔驰\'', null, '0', '1', null, '1577808971', null, '0'), ('1778256940335054848', '1758164842805493760', '1778237217845231617', '1778245876499300352', '4', '1', ' SELECT car_brand,month,sales FROM demo_car_sales\nWHERE 1=1 AND month =10  AND car_brand =\'奔驰\'', null, '0', '1', null, '1577808977', null, '0'), ('1779176475653275648', '1758164842805493760', '1778237217845231617', '1778245876499300352', '34', '1', ' SELECT car_brand,month,sales FROM demo_car_sales\nWHERE 1=1   ', null, '0', '1778212684992036864', null, '1577862501', null, '0');
COMMIT;

-- ----------------------------
--  Table structure for `sys_resource`
-- ----------------------------
DROP TABLE IF EXISTS `sys_resource`;
CREATE TABLE `sys_resource` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `parent_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '父节点Id',
  `type` tinyint(1) DEFAULT '0' COMMENT '0 - 菜单; 1 - 资源项',
  `name` varchar(64) NOT NULL COMMENT '资源名称',
  `path` varchar(128) DEFAULT NULL COMMENT '资源路径',
  `auth_code` varchar(128) DEFAULT NULL COMMENT '资源权限编码',
  `icon` varchar(64) DEFAULT NULL COMMENT '资源图标',
  `level` int(11) NOT NULL DEFAULT '1' COMMENT '层级',
  `sort_id` bigint(20) NOT NULL DEFAULT '1' COMMENT '排序字段',
  `comment` varchar(512) DEFAULT NULL COMMENT '备注信息',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统资源表';

-- ----------------------------
--  Records of `sys_resource`
-- ----------------------------
BEGIN;
INSERT INTO `sys_resource` VALUES ('1', '0', '0', '系统管理', '/system', '1', 'laptop', '1', '1', null, '0', '1', '1', '1', '1'), ('2', '1', '0', '用户管理', '/system/user-manage', '1', 'user', '2', '1', null, '0', '1', '1', '1', '1'), ('3', '1', '0', '角色管理', '/system/role-manage', '1', 'team', '2', '1', null, '0', '1', '1', '1', '1'), ('4', '1', '0', '资源管理', '/system/res-manage', '1', 'menu', '2', '1', null, '0', '1', '1', '1', '1'), ('5', '20', '0', '数据导入', '/peekdata/data-import', '1', 'chart', '2', '1', null, '1', '1', '1', '1', '1'), ('10', '0', '0', '基础信息管理', '/common', '1', 'tool', '1', '1', null, '0', '1', '1', '1', '1'), ('11', '10', '0', '数据源管理', '/common/datasource-manage', '1', 'api', '2', '1', null, '0', '1', '1', '1', '1'), ('12', '10', '0', '系统基础配置管理', '/common/common-info', '1', 'setting', '2', '1', null, '0', '1', '1', '1', '1'), ('20', '0', '0', '自助取数', '/peekdata', '1', 'robot', '1', '1', null, '0', '1', '1', '1', '1'), ('21', '20', '0', '模型管理', '/peekdata/model-manage', '1', 'database', '2', '1', null, '0', '1', '1', '1', '1'), ('22', '20', '0', '标签管理', '/peekdata/tags', '1', 'tags', '2', '1', null, '0', '1', '1', '1', '1'), ('23', '20', '0', '取数管理', '/peekdata/query-manage', '1', 'filter', '2', '1', null, '0', '1', '1', '1', '1'), ('30', '0', '0', '报表管理', '/report', '1', 'appstore', '1', '1', null, '0', '1', '1', '1', '1'), ('31', '30', '0', '报表组管理', '/report/group', '1', 'cluster', '2', '1', null, '0', '1', '1', '1', '1'), ('32', '30', '0', '报表设计', '/report/design', '1', 'pie-chart', '2', '1', null, '0', '1', '1', '1', '1'), ('33', '30', '0', '报表日志', '/report/log', '1', 'history', '2', '1', null, '0', '1', '1', '1', '1'), ('1779175393321517057', '0', '0', '报表查询', '/query', null, 'eye', '1', '1779175393321517056', null, '0', '1', null, '1577862438', null);
COMMIT;

-- ----------------------------
--  Table structure for `sys_role_rl_report`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_rl_report`;
CREATE TABLE `sys_role_rl_report` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `role_id` bigint(20) NOT NULL COMMENT '角色Id',
  `report_id` bigint(20) NOT NULL COMMENT '报表Id',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色与报表关系表';

-- ----------------------------
--  Records of `sys_role_rl_report`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_rl_report` VALUES ('1779176149235761152', '1', '1778237217845231617', '0', '1', null, '1577862482', null);
COMMIT;

-- ----------------------------
--  Table structure for `sys_role_rl_resource`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_rl_resource`;
CREATE TABLE `sys_role_rl_resource` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `role_id` bigint(20) NOT NULL COMMENT '角色Id',
  `res_id` bigint(20) NOT NULL COMMENT '资源Id',
  `mask` int(11) NOT NULL COMMENT '权限掩码: 1 - 查看; 2 - 新增; 4 - 修改; 8 - 删除',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色与资源关系表';

-- ----------------------------
--  Records of `sys_role_rl_resource`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_rl_resource` VALUES ('1778186331072708608', '1778185111301996544', '2', '15', '0', '1', null, '1577804867', null), ('1778186331072708609', '1778185111301996544', '3', '15', '0', '1', null, '1577804867', null), ('1778186331072708610', '1778185111301996544', '4', '15', '0', '1', null, '1577804867', null), ('1778186331072708611', '1778185111301996544', '11', '15', '0', '1', null, '1577804867', null), ('1778186331072708612', '1778185111301996544', '12', '15', '0', '1', null, '1577804867', null), ('1778186331072708613', '1778185111301996544', '21', '15', '0', '1', null, '1577804867', null), ('1778186331072708614', '1778185111301996544', '22', '15', '0', '1', null, '1577804867', null), ('1778186331072708615', '1778185111301996544', '23', '15', '0', '1', null, '1577804867', null), ('1778186331072708616', '1778185111301996544', '31', '15', '0', '1', null, '1577804867', null), ('1778186331072708617', '1778185111301996544', '32', '15', '0', '1', null, '1577804867', null), ('1778186331072708618', '1778185111301996544', '33', '15', '0', '1', null, '1577804867', null), ('1779175943077330944', '1', '31', '15', '0', '1', null, '1577862470', null), ('1779175943077330945', '1', '32', '15', '0', '1', null, '1577862470', null), ('1779175943077330946', '1', '33', '15', '0', '1', null, '1577862470', null);
COMMIT;

-- ----------------------------
--  Table structure for `sys_user`
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` bigint(20) NOT NULL,
  `user_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '用户类型 0 - 系统内部用户; 1 - sso登录用户',
  `nickname` varchar(128) NOT NULL COMMENT '用户昵称',
  `username` varchar(256) NOT NULL COMMENT '登录用户名, 这里为登录邮箱地址',
  `password` varchar(128) NOT NULL COMMENT '登录密码',
  `roles` varchar(512) DEFAULT NULL COMMENT '用户角色',
  `email_active_code` varchar(128) DEFAULT NULL COMMENT '邮件激活码',
  `department` varchar(128) DEFAULT NULL COMMENT '所在部门',
  `position` varchar(64) DEFAULT NULL COMMENT '职位',
  `avatar` varchar(512) DEFAULT NULL COMMENT '用户头像',
  `signature` varchar(512) DEFAULT NULL COMMENT '个性签名',
  `phone` varchar(16) DEFAULT NULL COMMENT '手机号',
  `email` varchar(128) DEFAULT NULL COMMENT '邮箱号',
  `address` varchar(512) DEFAULT NULL COMMENT '地址',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态 0 - 注册未激活; 1 - 正常; 2 - 锁定(不可用)',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 - 正常数据; 1 - 已归档(删除)',
  `created` bigint(20) NOT NULL COMMENT '创建时间',
  `created_by` bigint(20) NOT NULL COMMENT '创建人',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后一次更新时间',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '最后一次修改人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统用户信息表';

-- ----------------------------
--  Records of `sys_user`
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES ('1', '0', 'admin', 'admin', 'A21EABAD6C24B8D70FB8BE4593637895', '', '1', '1', null, null, null, null, 'sxlfgst@163.com', null, '1', '0', '1', '1', '1577805999', '1'), ('1778212684992036864', '0', '小李', 'xiaoli', 'D6C6A7C15E469AB27A33D5D55060ADE5', null, null, '2', null, null, null, null, 'XXXX@qq.com', null, '1', '0', '1577806401', '1', '1577862589', '1');
COMMIT;

-- ----------------------------
--  Table structure for `sys_user_rl_role`
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_rl_role`;
CREATE TABLE `sys_user_rl_role` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `user_id` bigint(20) NOT NULL COMMENT '用户Id',
  `role_id` bigint(20) NOT NULL COMMENT '角色Id',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户与角色关系表';

-- ----------------------------
--  Records of `sys_user_rl_role`
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_rl_role` VALUES ('1769229348575363072', '1769227836746874880', '1', '0', '1', null, '1577283502', null), ('1778205778684624896', '1', '1778185111301996544', '0', '1', null, '1577805999', null), ('1779177987481763840', '1778212684992036864', '1', '0', '1', null, '1577862589', null);
COMMIT;

-- ----------------------------
--  Table structure for `sys_user_role`
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `name` varchar(64) NOT NULL COMMENT '角色名称',
  `code` varchar(32) NOT NULL COMMENT '角色编码, 如: ROLE_ADMIN',
  `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '角色类型: 0 - 普通; 1 - 默认角色',
  `desc` varchar(512) DEFAULT NULL COMMENT '描述',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户角色表';

-- ----------------------------
--  Records of `sys_user_role`
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role` VALUES ('1', '测试角色', 'TEST', '0', null, '0', '1', null, '1576639954', null), ('1778185111301996544', '超级管理员', 'ADMIN', '0', null, '0', '1', null, '1577804796', null);
COMMIT;

-- ----------------------------
--  Table structure for `sys_user_session`
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_session`;
CREATE TABLE `sys_user_session` (
  `id` bigint(20) NOT NULL COMMENT '主键Id',
  `user_id` bigint(20) NOT NULL COMMENT '用户Id',
  `token` varchar(128) NOT NULL COMMENT '用户登录token',
  `timeout` int(11) NOT NULL COMMENT '有效时间',
  `login_time` bigint(20) DEFAULT NULL COMMENT '登录时间',
  `archive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志 0 - 正常; 1 - 已删除',
  `created_by` bigint(20) NOT NULL COMMENT '创建人Id',
  `modified_by` bigint(20) DEFAULT NULL COMMENT '修改人Id',
  `created` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `modified` bigint(20) DEFAULT NULL COMMENT '最后修改时间',
  `ladon_import_id` bigint(20) DEFAULT NULL,
  `ladon_archived` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户会话信息表';

-- ----------------------------
--  Records of `sys_user_session`
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_session` VALUES ('1773207690882380000', '1', 'D27C064790F9BFF67EE29DEE3F7FD62C', '120', '1577515072790', '0', '-1', null, '1577515072', null, '1773585287227170816', '0'), ('1773570443820200000', '1', '809B8CB816D3C190D7E92688AF4F49F7', '120', '1577536187037', '0', '-1', null, '1577536187', null, '1773585287227170816', '0'), ('1773584067456458752', '1', '26F955074D07E1C4A1F015C85CFA7888', '120', '1577536980521', '0', '-1', null, '1577536980', null, null, null), ('1773709721019670528', '1', '57BD370E7E985F6E4B139C9964A196C5', '120', '1577544294511', '0', '-1', null, '1577544294', null, null, null), ('1775087632427646976', '1', 'EB1A0CDEED9353940BB5B272D58C89E1', '120', '1577624499986', '0', '-1', null, '1577624500', null, null, null), ('1778146628394999808', '1769227836746874880', '20792A8E6B2AA95E9BF18FCA0398723E', '120', '1577802556674', '0', '-1', null, '1577802556', null, null, null), ('1778167879893188608', '1769227836746874880', '58CEFFAA94C2E938AF91BA6C6102B43F', '120', '1577803793173', '0', '-1', null, '1577803793', null, null, null), ('1778174373883748352', '1', 'F884399F5F1F1E26B394B6A42E26F1BC', '120', '1577804171729', '0', '-1', null, '1577804171', null, null, null), ('1779164999500660736', '1', '1000C64BC07DBC3441077AB4AF257E00', '120', '1577861833567', '0', '-1', null, '1577861833', null, null, null), ('1779169053949788160', '1778212684992036864', 'C39589AD622C9F6D45632483F9DF8632', '120', '1577862069553', '0', '-1', null, '1577862069', null, null, null), ('1779169397547171840', '1', '38F84E98F28BF6E4A202C6189B15F0D0', '120', '1577862089692', '0', '-1', null, '1577862089', null, null, null), ('1779176355394191360', '1778212684992036864', 'E72E9C466B3C7AF84292139731FFB755', '120', '1577862494096', '0', '-1', null, '1577862494', null, null, null), ('1779177609524641792', '1778212684992036864', '6C522250FACBFD10B1923057896F45C0', '120', '1577862567999', '0', '-1', null, '1577862568', null, null, null), ('1779177815683072000', '1', '3C923E064F8DE9BEE21B6D48324B4B88', '120', '1577862579861', '0', '-1', null, '1577862579', null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `uid_worker_node`
-- ----------------------------
DROP TABLE IF EXISTS `uid_worker_node`;
CREATE TABLE `uid_worker_node` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `host_name` varchar(255) DEFAULT NULL,
  `port` varchar(255) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `launch_time` bigint(20) DEFAULT NULL,
  `created` bigint(20) DEFAULT NULL,
  `modified` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8;

SET FOREIGN_KEY_CHECKS = 1;
